]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Deal with title-less windows
authorDan Winship <danw@gnome.org>
Fri, 13 Nov 2009 19:38:38 +0000 (14:38 -0500)
committerDan Winship <danw@gnome.org>
Fri, 13 Nov 2009 21:04:17 +0000 (16:04 -0500)
https://bugzilla.gnome.org/show_bug.cgi?id=601290

js/ui/altTab.js
src/shell-app-system.c

index a1a5f1612dac062071c6137b6ec05116dbb9b38c..dd77266316aba4d8b6dc1fd6b8b4ef1d9b0ddec7 100644 (file)
@@ -751,11 +751,14 @@ ThumbnailList.prototype = {
                                              height: height * scale });
             box.add_actor(clone);
 
-            let name = new St.Label({ text: windows[i].get_title() });
-            // St.Label doesn't support text-align so use a Bin
-            let bin = new St.Bin({ x_align: St.Align.MIDDLE });
-            bin.add_actor(name);
-            box.add_actor(bin);
+            let title = windows[i].get_title();
+            if (title) {
+                let name = new St.Label({ text: title });
+                // St.Label doesn't support text-align so use a Bin
+                let bin = new St.Bin({ x_align: St.Align.MIDDLE });
+                bin.add_actor(name);
+                box.add_actor(bin);
+            }
 
             this.addItem(box);
         }
index 898fd0f956bd884841ef9e464b53ee0fe1dbb4b0..2ec8774720b32bfdfa98c7b8648f24c3bc2bd610 100644 (file)
@@ -740,6 +740,8 @@ shell_app_info_get_name (ShellAppInfo *info)
       {
         char *title;
         g_object_get (info->window, "title", &title, NULL);
+        if (!title)
+          title = g_strdup ("");
         return title;
       }
   }